package demo1;

public abstract class Animal {
    public int age;
    public String name;

    public Animal(int age, String name) {
        this.age = age;
        this.name = name;
        System.out.println("调用Animal类构造方法");
    }

    public abstract void func();
    public void test() {
        System.out.println("调用Animal类的test()");
    }
}
